from flask import Flask
from flask import render_template,jsonify
from flask.json import dumps
from flask.ext.admin import Admin
import json

app = Flask(__name__)

admin=Admin(app)

@app.route('/')
def hello_world():
    return 'hello_world'

@app.route('/h')
def h1():
    return render_template('table.html')

@app.route('/data')
def data():
    with open('./static/data2.json') as f:
        json_data = json.load(f)
    return app.response_class(dumps(json_data,indent=2),mimetype='application/json')

@app.route('/data1')
def data1():
    return jsonify(data=['a',1,3])

app.debug=True
app.run()
